package cz.cvut.manatee.processManager;

public class ThreadListItem {
	
	protected static int counter = 0;
	
	protected final ThreadRunnable vlakno;
	protected final Thread thread;
	// identifikator polozky
	protected int number;
	
	public ThreadListItem(ThreadRunnable runnable, Thread thread){
		this.vlakno = runnable;
		this.thread = thread;
		this.number = ThreadListItem.counter++;
	}

	public ThreadRunnable getRunnable(){
		return this.vlakno;
	}

	public Thread getThread(){
		return this.thread;
	}

	public int getNumber(){
		return this.number;
	}
	
	public String toString() {
		return "Thread #" + number + "(age=" + vlakno.getAge() + "; busy=" + vlakno.isBusy() + ")";
	}
}
